Optimal. Leaf size=71 \[ \frac{C \log \left (\sqrt [3]{\frac{a}{b}}+x\right )}{b}-\frac{2 \left (\frac{a}{b}\right )^{2/3} \left (C \sqrt [3]{\frac{a}{b}}+B\right ) \tan ^{-1}\left (\frac{1-\frac{2 x}{\sqrt [3]{\frac{a}{b}}}}{\sqrt{3}}\right )}{\sqrt{3} a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0941567, antiderivative size = 71, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 42, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {1867, 31, 617, 204} \[ \frac{C \log \left (\sqrt [3]{\frac{a}{b}}+x\right )}{b}-\frac{2 \left (\frac{a}{b}\right )^{2/3} \left (C \sqrt [3]{\frac{a}{b}}+B\right ) \tan ^{-1}\left (\frac{1-\frac{2 x}{\sqrt [3]{\frac{a}{b}}}}{\sqrt{3}}\right )}{\sqrt{3} a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1867
Rule 31
Rule 617
Rule 204
Rubi steps
\begin{align*} \int \frac{\sqrt [3]{\frac{a}{b}} B+2 \left (\frac{a}{b}\right )^{2/3} C+B x+C x^2}{a+b x^3} \, dx &=\frac{C \int \frac{1}{\sqrt [3]{\frac{a}{b}}+x} \, dx}{b}+\frac{\left (B+\sqrt [3]{\frac{a}{b}} C\right ) \int \frac{1}{\left (\frac{a}{b}\right )^{2/3}-\sqrt [3]{\frac{a}{b}} x+x^2} \, dx}{b}\\ &=\frac{C \log \left (\sqrt [3]{\frac{a}{b}}+x\right )}{b}+\left (2 \left (\frac{\left (\frac{a}{b}\right )^{2/3} B}{a}+\frac{C}{b}\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1-\frac{2 x}{\sqrt [3]{\frac{a}{b}}}\right )\\ &=-\frac{2 \left (\frac{\left (\frac{a}{b}\right )^{2/3} B}{a}+\frac{C}{b}\right ) \tan ^{-1}\left (\frac{1-\frac{2 x}{\sqrt [3]{\frac{a}{b}}}}{\sqrt{3}}\right )}{\sqrt{3}}+\frac{C \log \left (\sqrt [3]{\frac{a}{b}}+x\right )}{b}\\ \end{align*}
Mathematica [B] time = 0.267454, size = 247, normalized size = 3.48 \[ \frac{\sqrt [3]{b} \left (a^{2/3} B-\sqrt [3]{a} \sqrt [3]{b} \sqrt [3]{\frac{a}{b}} \left (2 C \sqrt [3]{\frac{a}{b}}+B\right )\right ) \log \left (a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2\right )+2 \sqrt [3]{b} \left (\sqrt [3]{a} \sqrt [3]{b} \sqrt [3]{\frac{a}{b}} \left (2 C \sqrt [3]{\frac{a}{b}}+B\right )-a^{2/3} B\right ) \log \left (\sqrt [3]{a}+\sqrt [3]{b} x\right )+2 \sqrt{3} \sqrt [3]{a} \sqrt [3]{b} \left (\sqrt [3]{b} \sqrt [3]{\frac{a}{b}} \left (2 C \sqrt [3]{\frac{a}{b}}+B\right )+\sqrt [3]{a} B\right ) \tan ^{-1}\left (\frac{2 \sqrt [3]{b} x-\sqrt [3]{a}}{\sqrt{3} \sqrt [3]{a}}\right )+2 a C \log \left (a+b x^3\right )}{6 a b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 121, normalized size = 1.7 \begin{align*}{\frac{2\,C}{3\,b}\ln \left ( x+\sqrt [3]{{\frac{a}{b}}} \right ) }-{\frac{C}{3\,b}\ln \left ({x}^{2}-\sqrt [3]{{\frac{a}{b}}}x+ \left ({\frac{a}{b}} \right ) ^{{\frac{2}{3}}} \right ) }+{\frac{2\,C\sqrt{3}}{3\,b}\arctan \left ({\frac{\sqrt{3}}{3} \left ( 2\,{x{\frac{1}{\sqrt [3]{{\frac{a}{b}}}}}}-1 \right ) } \right ) }+{\frac{2\,B\sqrt{3}}{3\,b}\arctan \left ({\frac{\sqrt{3}}{3} \left ( 2\,{x{\frac{1}{\sqrt [3]{{\frac{a}{b}}}}}}-1 \right ) } \right ){\frac{1}{\sqrt [3]{{\frac{a}{b}}}}}}+{\frac{C\ln \left ( b{x}^{3}+a \right ) }{3\,b}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 5.69123, size = 948, normalized size = 13.35 \begin{align*} \left [\frac{C \log \left (x + \left (\frac{a}{b}\right )^{\frac{1}{3}}\right ) + \sqrt{\frac{1}{3}} \sqrt{-\frac{2 \, B C b \left (\frac{a}{b}\right )^{\frac{2}{3}} + B^{2} b \left (\frac{a}{b}\right )^{\frac{1}{3}} + C^{2} a}{a}} \log \left (-\frac{C^{3} a^{2} + B^{3} a b - 2 \,{\left (C^{3} a b + B^{3} b^{2}\right )} x^{3} + 3 \,{\left (C^{3} a b + B^{3} b^{2}\right )} x \left (\frac{a}{b}\right )^{\frac{2}{3}} + 3 \, \sqrt{\frac{1}{3}}{\left (2 \, B C a b x^{2} - B^{2} a b x + C^{2} a^{2} -{\left (2 \, B^{2} b^{2} x^{2} + C^{2} a b x + B C a b\right )} \left (\frac{a}{b}\right )^{\frac{2}{3}} -{\left (2 \, C^{2} a b x^{2} - B C a b x - B^{2} a b\right )} \left (\frac{a}{b}\right )^{\frac{1}{3}}\right )} \sqrt{-\frac{2 \, B C b \left (\frac{a}{b}\right )^{\frac{2}{3}} + B^{2} b \left (\frac{a}{b}\right )^{\frac{1}{3}} + C^{2} a}{a}}}{b x^{3} + a}\right )}{b}, \frac{2 \, \sqrt{\frac{1}{3}} \sqrt{\frac{2 \, B C b \left (\frac{a}{b}\right )^{\frac{2}{3}} + B^{2} b \left (\frac{a}{b}\right )^{\frac{1}{3}} + C^{2} a}{a}} \arctan \left (\frac{\sqrt{\frac{1}{3}}{\left (2 \, B^{2} b x - C^{2} a +{\left (2 \, C^{2} b x + B C b\right )} \left (\frac{a}{b}\right )^{\frac{2}{3}} -{\left (2 \, B C b x + B^{2} b\right )} \left (\frac{a}{b}\right )^{\frac{1}{3}}\right )} \sqrt{\frac{2 \, B C b \left (\frac{a}{b}\right )^{\frac{2}{3}} + B^{2} b \left (\frac{a}{b}\right )^{\frac{1}{3}} + C^{2} a}{a}}}{C^{3} a + B^{3} b}\right ) + C \log \left (x + \left (\frac{a}{b}\right )^{\frac{1}{3}}\right )}{b}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: PolynomialDivisionFailed} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.2488, size = 362, normalized size = 5.1 \begin{align*} -\frac{{\left (C b^{2} \left (-\frac{a}{b}\right )^{\frac{2}{3}} + B b^{2} \left (-\frac{a}{b}\right )^{\frac{1}{3}} + \left (a b^{2}\right )^{\frac{1}{3}} B b + 2 \, \left (a b^{2}\right )^{\frac{2}{3}} C\right )} \left (-\frac{a}{b}\right )^{\frac{1}{3}} \log \left ({\left | x - \left (-\frac{a}{b}\right )^{\frac{1}{3}} \right |}\right )}{3 \, a b^{2}} + \frac{\sqrt{3}{\left ({\left (9 \, \left (-a^{2} b^{4}\right )^{\frac{1}{3}} a b^{2} - 27^{\frac{5}{6}} \left (-a^{2} b^{4}\right )^{\frac{5}{6}}\right )} B + 18 \,{\left (a^{2} b^{3} - \sqrt{3} \sqrt{a^{4} b^{6}} i\right )} C\right )} \arctan \left (\frac{\sqrt{3}{\left (2 \, x + \left (-\frac{a}{b}\right )^{\frac{1}{3}}\right )}}{3 \, \left (-\frac{a}{b}\right )^{\frac{1}{3}}}\right )}{54 \, a^{2} b^{4}} + \frac{{\left ({\left (27 \, \left (-a^{2} b^{4}\right )^{\frac{1}{3}} a b^{2} + 27^{\frac{5}{6}} \left (-a^{2} b^{4}\right )^{\frac{5}{6}}\right )} B + 18 \,{\left (3 \, a^{2} b^{3} - \sqrt{3} \sqrt{a^{4} b^{6}} i\right )} C\right )} \log \left (x^{2} + x \left (-\frac{a}{b}\right )^{\frac{1}{3}} + \left (-\frac{a}{b}\right )^{\frac{2}{3}}\right )}{108 \, a^{2} b^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]